import service from './request'


export function getDepartment(params) {
    let {pagenum,pagesize}=params
    return service.get('/departmentTree?page='+pagenum+'&page_size='+pagesize)
}
export function getAllDepartment() {
    return service.get('/departments?queryinfo=all')
}
export function addDepartment(params) {
    return service.post('/addDepartment',params)
}
export function removeDepartment(id) {
    return service.delete('/departments/'+id)
}

export function getDepartmentItem(id) {
    return service.get('/departments/'+id)
}

export function editDepartmentItem(data) {
    return service.put('/departments/'+data.id,data)
}
// 获取所有二级部门信息
export function getTwoDepartment(){
    return service.get('/getALltwoDepart')
}
//获取所有的学院信息
export function getColleges() {  
    return service.get('/colleges')
}
//获取所有的部门类型

export function getDepartmentType() {
    return service.get('/department_types')
}
